package com.shuwei.location.db;

/**
 * Created by Halohoop on 2017/10/25.
 * @author Halohoop
 */

public interface TableTypeFilter {
    /*
    * cursor.getInt()
    * cursor.getFloat()
    * cursor.getLong()
    * cursor.getBlob()
    * cursor.getDouble()
    * cursor.getShort()
    * cursor.getString()
    * */
    int TYPE_INT = 0;
    int TYPE_FLOAT = 1;
    int TYPE_LONG = 2;
    int TYPE_BLOB = 3;
    int TYPE_DOUBLE = 4;
    int TYPE_SHORT = 5;
    int TYPE_STRING = 6;

    /**
     * 因为表每个字段的顺序是知道的，因此根据index返回该字段的类型
     * 例如{@link TableTypeFilter#TYPE_INT},{@link TableTypeFilter#TYPE_FLOAT}
     * @param columnIndex
     * @return
     */
    int getColumnType(int columnIndex);
}
